<extend name="Public/forum"/>

<block name="body">
    <div class="row fourm-posts">
        <h2>查找结果 —— 关键词 <span style="color: red">{$_REQUEST.keywords}</span></h2>

        <div class="col-xs-12">
            <section id="contents">
                <if condition="!$list">
                    <div class="row">
                        <div class="col-xs-12">
                            <p class="text-muted" style="text-align: center; font-size: 3em;">
                                <br/><br/>
                                暂时没有帖子～
                                <br/><br/><br/>
                            </p>
                        </div>
                    </div>
                </if>
                <volist name="list" id="document">
                    <php>
                        $user = query_user(array('avatar128','username','uid','space_url','icons_html'),
                        $document['uid']);
                    </php>
                    <div class="row">
                        <div class="col-xs-1">
                            <p>
                                <a href="{$user.space_url}">
                                    <img src="{$user.avatar128}" ucard="{$user.uid}" class="avatar-img"
                                         style="width:100%;"/>
                                </a>
                            </p>
                        </div>
                        <div class="col-xs-11">
                            <p>
                                <a class="forum-list-title-link"
                                   href="{:U('Index/detail',array('id'=>$document['id']))}">
                                    {$document.colored_title}
                                    <eq name="document.is_top" value="1"><i class="post_top">全局</i>
                                        <else/>
                                        <eq name="document.is_top" value="2"><i class="post_top_forum">版内</i></eq>
                                    </eq>
                                </a>
                            <p>
                                {$document.colored_content}
                            </p>

                            <p class="pull-right text-muted ">
                                <span>阅读（{$document.view_count}）</span>
                                <span style="width: 1em; display: inline-block;">&nbsp;</span>
                                <span>回复（{$document.reply_count}）</span>
                            </p>

                            <p class="text-muted author">
                                <a href="{$user.space_url}" ucard="{$user.uid}">{$user.username}</a>{$user.icons_html}
                                发布：{$document.create_time|friendlyDate} |
                                回复：{$document.last_reply_time|friendlyDate}

                            </p>
                        </div>
                    </div>
                    <if condition="$i neq count($list)">
                        <hr class="forum-list-hr"/>
                        <else/>
                        <div class="forum-list-no-hr"></div>
                    </if>
                </volist>
                <div class="pull-right">
                    {:getPagination($totalCount)}
                </div>
            </section>
        </div>
    </div>
</block>
